#pragma once
#include<iostream>
#include"Comm.hpp"

class Client
{
    public:
    Client():_fd(gdefultfd)
    {
        
    }
    bool OpenfifoWrite()
    {
        _fd=Openfifo(gForWrite);
        if(_fd<0)return false;
        return true;
    }
    int Sendfifo(const string &in)
    {
        return write(_fd,in.c_str(),in.size());
    }
    void Closefifo()
    {
        if(_fd>0)
        ::close(_fd);
    }
    ~Client()
    {
       ClosefifoHelper(_fd);
    }
private:
    int _fd;
};


